From: awilliam@xenbuild.aw Date: Tue, 23 May 2006 23:05:27 +0000 (-0600) Subject: [IA64] work around ENOSYS vs EINVAL in ioremap X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16038 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=bc77a64b00d1b014c495ba2465a15554f1189170;p=xen.git [IA64] work around ENOSYS vs EINVAL in ioremap We should not panic the domain for an EINVAL return from the ioremap hyerpcall. This was only meant for ENOSYS. Long term this is probably not the best place for this kind of sanity checking. Signed-off-by: Alex Williamson --- diff --git a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h index 81c8c7ee4e..45f65ebc2a 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h @@ -431,10 +431,12 @@ HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) unsigned long ret = ioaddr; if (running_on_xen) { ret = __HYPERVISOR_ioremap(ioaddr, size); - if (unlikely(IS_ERR_VALUE(ret))) + if (unlikely(ret == -ENOSYS)) panic("hypercall %s failed with %ld. " "Please check Xen and Linux config mismatch\n", __func__, -ret); + else if (unlikely(IS_ERR_VALUE(ret))) + ret = ioaddr; } return ret; }